package com.study.a01mycollection;

import java.util.ArrayList;
import java.util.Collection;

public class A01_CollectionDemo1 {
    public static void main(String[] args) {


        //学习Collection接口方法
        Collection<String> coll = new ArrayList<>();

        //添加元素
        coll.add("hello");

        //清空
        coll.clear();

        //删除
        coll.remove("hello");

        //判断包含
        boolean b = coll.contains("hello");
        System.out.println(b);
        System.out.println(coll);
    }
}
